public member function
<iterator>

std::istream_iterator::operator->

pointer operator->() const;
Dereference iterator
Returns a pointer to the element pointed to by the iterator (in order to access one of its members).

Internally, the function returns a pointer to the value the object stores as its current element.

If the iterator has just been constructed from an input stream, and the implementation of that operation did not extract a value form the stream on construction, it is now extracted.

Parameters

none

Return value

A pointer to the element pointed by the iterator.
Member type pointer is an alias of const value_type*, where value_type is the type of the elements extracted by the operator (the first class template parameter).

Data races

The object is accessed (certain library implementations may also modify it).
The pointer returned can be used to access elements.

Exception safety

Strong guarantee: if an exception is thrown, there are no changes in the visible state of the iterator.

See also